package com.remist.web.action;

import java.util.List;

import com.remist.model.ImageMapBean;
import com.remist.model.ProductType;
import com.remist.service.ImagesService;
import com.remist.service.ProductTypeService;

public class AJaxAction extends BaseAction {

	/**	serialVersionUID */
	private static final long serialVersionUID = 4935123493483435986L;
	private ProductTypeService productTypeService;
	private ImagesService imagesService;
	private List<ProductType> productTypes;
	private ProductType  productType;
	private ImageMapBean image ;
	
	public void setProductTypeService(ProductTypeService productTypeService) {
		this.productTypeService = productTypeService;
	}


	public ImageMapBean getImage() {
		return image;
	}


	public void setImage(ImageMapBean image) {
		this.image = image;
	}


	public void setImagesService(ImagesService imagesService) {
		this.imagesService = imagesService;
	}


	public String getProductType(){
		productTypes = productTypeService.listSonProductTypeByParentKey(productType);
		return SUCCESS;
	}

	public String deleteImageById(){
		imagesService.deleteImageById(image );
		return SUCCESS;
	}
	public List<ProductType> getProductTypes() {
		return productTypes;
	}


	public void setProductTypes(List<ProductType> productTypes) {
		this.productTypes = productTypes;
	}


	public void setProductType(ProductType productType) {
		this.productType = productType;
	}
}
